package com.wonder.app.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wonder.admin.domain.SysAdmin;
import com.wonder.app.domain.PrdFeed;
import com.wonder.app.domain.PrdInstock;
import com.wonder.app.domain.PrdInstockDetail;
import com.wonder.app.domain.SfcOptrptPackage;
import com.wonder.app.request.PrdFeedRequest;
import com.wonder.app.request.PrdInstockRequest;

import java.util.List;
import java.util.Map;

public interface PrdInstockService extends IService<PrdInstock>{

    /**
     * 工序汇报分页
     * @param prdInstockRequest
     * @param page
     * @return
     */
    public  IPage<PrdInstock> selectList(PrdInstockRequest prdInstockRequest, Page<PrdInstock> page);
    /**
     * 详情Stkotherout
     * @param map
     * @return
     */
    Map<String, Object> getPrdInstockDetail(Map<String, Object> map) ;

    /**
     * 创建生产入库单
     * @param map
     * @param username
     * @return
     * @throws Exception
     */
    boolean createPrdInstock(Map<String,Object> map,String username,Long user_id,String reportNo,Double failCount) throws Exception;
    /**
     * 详情Stkotherout
     * @param map
     * @return
     */
    Map<String, Object> getprdinstockde(Long user_id, Map<String, Object> map)throws Exception ;

    Map<String, Object> getProInstocklist(SysAdmin user, Map<String, Object> map);

    Boolean auditPrdInspect(Long user_id, String userName, Map<String, Object> map) throws Exception;

    Boolean auditPrdIn(Long user_id, String userName, Map<String, Object> map) throws Exception;

    Boolean createPrdInstockByCheck(Map<String, Object> master, Map<String, Object> map, String userName,Long user_id) throws Exception;

    Boolean createPrdInstockPackage(Long user_id, String userName, SfcOptrptPackage sfcOptrptPackage)throws Exception;

    Map<String, Object> getprdinstockdeKu(Long user_id, Map<String, Object> map)throws Exception;

    Map<String, Object> getProInstocklistQuality(SysAdmin user,Map<String, Object> map)throws Exception;

    Map<String, Object> getInStockByTray(Map<String, Object> map)throws Exception;

    Map<String, Object> getprdinstockdeKuMerge(Long user_id, Map<String, Object> map)throws Exception;

    Boolean deleteMerge(Map<String, Object> map)throws Exception;


    Map<String, Object> mergeTrayPda(String userName, Map<String, Object> map)throws Exception;

    Boolean auditPrdInMerge(Long user_id, String userName, Map<String, Object> map)throws Exception;

    public Boolean auditPrdInSM(Long user_id,String userName,PrdInstock prdInstock,List<PrdInstockDetail> detailList) throws Exception;
}
